package com.doubtech.ahome.widgets.openclock;

/**
 * <p>If your widget view support multi-instance, you may implement this interface.
 * If you implement it, aHome will tell widget what id it is after it is created. The
 * id doesn't changed until user delete it from screen or clear aHome data. You can use 
 * the id to fetch instance-specific data so different instances can show different content</p>
 * 
 * @author luma
 */
public interface MultiInstanceSupport {
	/**
	 * <p>Instance id of this widget. This id comes from aHome's database so it doesn't change until
	 * user delete it from screen. You can use this id to fetch instance-specific data.</p>
	 * <p>This method will be called after widget view is created or inflated, 
	 * but before view is attached to window. So, you should schedule data load procedure after 
	 * onFinishInflate().</p>
	 * 
	 * @param id instance id of widget
	 */
	public void setInstanceId(int id);
}
